<template>
	<view class="indexService" >
	 <view class="cu-list grid" :class="['col-' + gridCol,gridBorder?'':'no-border']" >
		<view class="cu-item" v-for="(item,index) in cuIconList" :key="index" v-if="index<gridCol*2">
			<view :class="['cuIcon-' + item.cuIcon,'text-' + item.color]" @click="Fn(item.change)"></view>
			<text >{{item.name}}</text>
		</view>
	</view>
	</view>

</template>

<script>
	export default {
	data() {
		return {
			cuIconList: 
			[{cuIcon: 'deliver_fill',color: 'red',badge: 0,name: '报修',change:'aa'}, 
			{cuIcon: 'search',color: 'orange',badge: 0,name: '搜索',change:'bb'},
			{cuIcon: 'time',color: 'yellow',badge: 0,name: '签到',change:'cc'}],
	        gridCol: 3,
			gridBorder: true
		};
		},
		methods:{
			Fn(change){
				this[change]()
			},
			aa(){
				uni.navigateTo({
					url:'../../pages/fix/fix'
				})
			},
			bb(){
				uni.navigateTo({
					url:'../../pages/searchPage/searchPage'
				})
			},
			cc(){
				uni.navigateTo({
					url:'../../pages/signIn/check/check'
				})
			}
			
			
			
		}
	}	

</script>

<style>
</style>
















<!-- <template>
	<view class="indexService" >
	 <view class="cu-list grid" :class="['col-' + gridCol,gridBorder?'':'no-border']" >
		<view class="cu-item" v-for="(item,index) in cuIconList" :key="index" v-if="index<gridCol*2" >
			<view :class="['cuIcon-' +item.cuIcon,'text-' + item.color]"  ></view>
			<text >{{item.name}}</text>
    </view>
	</view>
	</view>
</template>



<script>
	export default {
	data() {
		return {
			cuIconList: 
			[{cuIcon: 'deliver_fill',color: 'red',badge: 0,name: '报修', change:aa}, 
			{cuIcon: 'search',color: 'orange',badge: 0,name: '搜索',change:bb},
			{cuIcon: 'time',color: 'yellow',badge: 0,name: '签到',change:cc}],
	        gridCol: 3,
			gridBorder: true
		};
		},
		methods:{
			fn(change){
				this[change]()
			},
			aa(){
				uni.navigateTo({
					url:'../../pages/test1/test1'
				})
			},
			bb(){
				uni.navigateTo({
					url:'../../pages/test2/test2'
			    })
			},
			cc(){
				uni.navigateTo({
					url:'../../pages/test1/test1',
			})
			}
		
	}
	}

</script>

<style>
	
</style>

<!-- <template>
	<view class="indexService"  >
	 <view class="cu-list grid" :class="['col-' + gridCol,gridBorder?'':'no-border']" >
		<view class="cu-item" ><!-- v-for="(item,index) in cuIconList" :key="index" v-if="index<gridCol*2" -->
			<view :class="['cuIcon-' + item.cuIcon,'text-' + item.color]" ></view>
			<text >{{item.name}}</text>
		</view>
	</view>
	</view> --> -->